﻿using System.Windows;
using System.Windows.Documents;

namespace WPFUI
{
    public partial class LogView : Window
    {
        public LogView(string log)
        {
            InitializeComponent();
            WriteToLogView(log);
        }

        private void WriteToLogView(string log)
        {
            FlowDocument document = new FlowDocument();
            Paragraph paragraph = new Paragraph();
            paragraph.Inlines.Add(new Bold(new Run(log)));
            document.Blocks.Add(paragraph);
            logTextBox.Document = document;
        }
    }
}
